package org.sky.prdcst.test;

import org.sky.prdcst.Consumer;
import org.sky.prdcst.Product;
import org.sky.prdcst.Storage;

public class MyConsumer extends Consumer{
	public MyConsumer(Storage s){
		this.s=s;
	}
	@Override
	public void run() {
		
			 try {
				 while(true){
					Product product;
					for(int i=0;i<10;i++){
						 product = this.s.pop();
						 System.out.println("消费");
					}
					
					Thread.sleep(3000);
				 }
			} catch (InterruptedException e) {

				e.printStackTrace();
			}

		
	}



}
